﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UNSWThink
{
   /// <summary>
   /// Object that represents a Answer entry in the database
   /// </summary>
   public class Answer
   {
      private int id;
      private int questionID;
      private string description;
      private bool isCorrect;
      private string image;

      /// <summary>
      /// Default constructor
      /// </summary>
      public Answer()
      {
         id = 0;
         questionID = 0;
         description = String.Empty;
         isCorrect = false;
         image = String.Empty;
      }

      /// <summary>
      /// Alternate constructor
      /// </summary>
      /// <param name="id">
      /// ID of the record
      /// </param>
      /// <param name="questionID">
      /// ID of the related question
      /// </param>
      /// <param name="description">
      /// Description of the  answer
      /// </param>
      /// <param name="isCorrect">
      /// Whether or not the answer is correct
      /// </param>
      /// <param name="image">
      /// File path of an image that is related to this answer
      /// (Optional: database will default to "NONE" is empty string is supplied)
      /// </param>
      public Answer(int id, int questionID,string description, bool isCorrect, string image)
      {
         this.id = id;
         this.questionID = questionID;
         this.description = description;
         this.isCorrect = isCorrect;
         this.image = image;
      }

      /// <summary>
      /// Gets or sets the ID
      /// </summary>
      public int ID
      {
         get
         {
            return id;
         }
         set
         {
            id = value;
         }
      }

      /// <summary>
      /// Gets or sets the question ID
      /// </summary>
      public int Question
      {
         get
         {
            return questionID;
         }
         set
         {
            questionID = value;
         }
      }

      /// <summary>
      /// Gets or sets the correctness of the answer
      /// </summary>
      public bool Correct
      {
         get
         {
            return isCorrect;
         }
         set
         {
            isCorrect = value;
         }
      }

      /// <summary>
      /// Gets or sets the description
      /// </summary>
      public string Description
      {
         get
         {
            return description;
         }
         set
         {
            description = value;
         }
      }

      /// <summary>
      /// Gets or sets the image file path
      /// </summary>
      public string Image
      {
         get
         {
            return image;
         }
         set
         {
            image = value;
         }
      }
   }
}
